1. Field of the Invention
The present invention relates to an image-capturing device utilized in an electronic camera or the like that captures a subject image and records electronic image data.
2. Description of the Related Art
There are electronic cameras in the known art having an image-capturing device that captures a subject image having passed through a photographic lens with a CCD or the like and outputs image data and an image processing circuit that performs image processing such as white balance adjustment and γ correction by adjusting the amplification gains for the image data output from the image-capturing device. The image processing in the image processing circuit is executed by calculating parameters such as the R gain and the B gain for the white balance adjustment or the gradation curve for the γ correction with a predetermined algorithm based upon the image data output from the image-capturing device.
In the electronic camera in the related art, a white balance adjustment coefficient is calculated so as to set the averages of color information corresponding to the main subject and the background of a captured image to a value indicating an achromatic color such as white or gray and the white balance adjustment is implemented on the image data using the adjustment coefficient thus calculated. Under normal circumstances, if the light source used to illuminate the subject is changed, the color of the subject appears different to the human eye. For instance, the subject color assumes a reddish tinge under sunlight in the morning or in the evening, whereas it assumes a greenish tinge under fluorescent light. If the white balance adjustment is implemented in the method of the related art in such a situation, the correction is executed using the complementary color of red or green, giving rise to the risk of a so-called color failure. Thus, a white balance adjustment failure tends to occur readily.